﻿//=======================================================
//==        XingNet SDK by Tim Cadenbach               ==
//==            DO NOT REMOVE THIS                     ==
//==            Appache License v.2                    ==
//==                                                   ==
//== File: XingNet.Utility.HelperClasses.cs            ==
//== Purpose: Needed for Serialization                 ==
//== History:                                          ==
//== 03-FEB-2012 - TCA - Created                       ==
//=======================================================


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

namespace XingNet.Web.Model.Utility
{
  public class JsonTimeZone
  {
    [JsonProperty(PropertyName = "name")]
    string Name { get; set; }
    [JsonProperty(PropertyName = "utc_offset")]
    string OffSet { get; set; }

  }
  public class JsonDateTime
  {
    [JsonProperty(PropertyName = "Day")]
    string Day { get; set; }
    [JsonProperty(PropertyName = "Month")]
    string Month { get; set; }
    [JsonProperty(PropertyName = "Year")]
    string Year { get; set; }
    public DateTime ToDateTime()
    {
      return new DateTime(int.Parse(Year), int.Parse(Month), int.Parse(Day));
    }
    public override string ToString()
    {
      return new DateTime(int.Parse(Year), int.Parse(Month), int.Parse(Day)).ToShortDateString();
    }
  }



}
